module sdldee.video.rectangle;

import sdldee.c.sdl;

class Rectangle {
	private SDL_Rect* _rect;
	
	this(SDL_Rect* rect) {
		_rect = rect;
	}
	
	this() {
		this(0, 0, 0, 0);
	}
	
	this(short x, short y, ushort w, ushort h) {
		_rect = new SDL_Rect();
		_rect.x = x;
		_rect.y = y;
		_rect.w = w;
		_rect.h = h;
	}
	
	public SDL_Rect* crect() {
		return _rect;
	}
	
	public short x() {
		return _rect.x;
	}
	
	public void x(short value) {
		_rect.x = value;
	}
	
	public short y() {
		return _rect.y;
	}
	
	public void y(short value) {
		_rect.y = value;
	}
	
	public ushort w() {
		return _rect.w;
	}
	
	public void w(ushort value) {
		_rect.w = w;
	}
	
	public ushort h() {
		return _rect.h;
	}
	
	public void h(ushort value) {
		_rect.h = value;
	}
}
